<{include file="tpl/header.html"}>

<h2 class="ytadmin-h2">留言列表
</h2>
<div class="clearfix ytadmin-search-box">
<form class="form-inline" role="form" action="<{spUrl c=comment a=index}>" method="post">
	<div class="form-group">
		<label class="sr-only" for="s_content">搜索内容</label>
      	<input class="form-control" type="text" id="s_content" name="s_content" value="<{$data_return['s_content']}>" placeholder="搜索内容"/>
    </div>
    <!--
    <div class="form-group">
    	<label class="sr-only" for="s_cat_id">搜索分类</label>
      	<select name="cat_id" id="s_cat_id" class="form-control">
				<option value="0">全部分类</option>
		<{foreach key=key item=cat_item from=$cat_result}>
			<{if $data_return['cat_id']==$cat_item['id']}>
				<option value="<{$cat_item['id']}>" selected="selected"><{$cat_item['name']}></option>
			<{else}>
				<option value="<{$cat_item['id']}>"><{$cat_item['name']}></option>
			<{/if}>
		<{/foreach}>
	  	</select>
	</div>
	-->
	<div class="form-group">
      	<input class="btn btn-info" type="submit" name="s_submit" value="搜索">
    </div>
</form>
</div>
<div class="ytadmin-table-wrap">
	<h3>
	<{if $data_return['s_submit']}>
		关于"<{$data_return['s_content']}>"的搜索结果
	<{/if}>
	</h3>
	<table class="table table-striped">
		<tr>
			<th>姓名</th>
			<th>电话</th>
			<th>主题</th>
			<th>内容</th>
			<th>日期</th>
			<th>操作</th>
		</tr>
	<{foreach item=item from=$comment_result}>
		<tr>
		<td>
				<{$item['username']}>
			</td>
			<td>
				<{$item['phone']}>
			</td>
			<td>
				<{$item['title']}>
			</td>
			<td>
				<{$item['content']}>
			</td>
			<td>
				<{$item['time']}>
			</td>
			<td>
				<a class="btn btn-warning btn-sm" title="删除" href="<{spUrl c=comment a=index delete_comment_id=$item['id'] module=$module module_id=$module_id}>">删除</a>
			</td>
		</tr>
	<{foreachelse}>
		<tr><td colspan="6">此分类下连一个留言也没有！</td></tr>
	<{/foreach}>
	</table>
	
	<{include file="tpl/pagination.html"}>
	
</div>

<{include file="tpl/footer.html"}>